<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        button:active {
            background-color: blue;
            color: white;
        }
        p:hover {
            background-color: green;
        }
        ::selection {
            background-color: yellow;
            color: red;
        }
        input:focus{
            border: 2px solid #333;
        }
        input:checked + label {
            font-weight: bold;
        }
        li:not(:last-child){
            margin-bottom : 10px;
        }
        li:nth-child(odd) {
            background-color: lightgray;
        }
        li:nth-child(even) {
            background-color: blue;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>伪类选择器示例</h1>
        <button>点击我</button>
        <p>鼠标悬浮在这里</p>
        <input type="text" >
        <input type="text" placeholder="输入框">
        <input type="checkbox" id="option1">
        <label for="option1">选项1</label>
        <input type="checkbox" id="option2" checked>
        <label for="option2">选项2</label>
        <ul>
          <li>列表项1</li>
          <li>列表项2</li>
          <li>列表项3</li>
          <li>列表项4</li>
        </ul>
  </div>
</body>
</html>